
public class EntranceDetection implements Runnable 
{

	public void run() {

		wait(.5);
//		try {
//			Main.score.run();
//		} catch (InterruptedException e) {
//			e.printStackTrace();
//		}
//		Main.score=new Score();
//		Thread playbackThread = new Thread(Main.score);
//		playbackThread.start();
	}
	public void wait(double wait) 
	{
		long startTime=System.nanoTime();
		long triggerTime=startTime+(long)(1000000*wait*Main.quarter);
		long currentTime=System.nanoTime();
		
		while (currentTime<triggerTime)
		{
			triggerTime=startTime+(long)(1000000*wait*Main.quarter);
			currentTime=System.nanoTime();
		}
	}
}
